﻿using System;

namespace Core.Bind
{
    public class ButtonClickBinder : AbstractBinder
    {
        public UIButton Target;
        public Action Func;

        public override void Bind()
        {
            Target.onClick += Func;
        }

        public override void UnBind()
        {
            Target.onClick -= Func;
        }

        public override void Dispose()
        {
            base.Dispose();

            Target = null;
            Func = null;
        }
    }
}
